Skip to content

Commit b0d5ab2

Browse files
[9.0] [Cloud Security] Cloud Security Posture - remove GCP required error state (#220676) (#220715)
# Backport This will backport the following commits from `main` to `9.0`: - [[Cloud Security] Cloud Security Posture - remove GCP required error state (#220676)](#220676) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"seanrathier","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-05-09T19:26:31Z","message":"[Cloud Security] Cloud Security Posture - remove GCP required error state (#220676)","sha":"473bab1189d77ee0537ab255d271b2b522d32a5c","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Cloud Security","backport:version","9.1 candidate","v9.1.0","v8.19.0","v9.0.1"],"title":"[Cloud Security] Cloud Security Posture - remove GCP required error state","number":220676,"url":"https://github.com/elastic/kibana/pull/220676","mergeCommit":{"message":"[Cloud Security] Cloud Security Posture - remove GCP required error state (#220676)","sha":"473bab1189d77ee0537ab255d271b2b522d32a5c"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/220676","number":220676,"mergeCommit":{"message":"[Cloud Security] Cloud Security Posture - remove GCP required error state (#220676)","sha":"473bab1189d77ee0537ab255d271b2b522d32a5c"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: seanrathier <[email protected]>
1 parent 57d3008 commit b0d5ab2

File tree

1 file changed

+2
-36
lines changed
  • x-pack/solutions/security/plugins/cloud_security_posture/public/components/fleet_extensions/gcp_credentials_form

1 file changed

+2
-36
lines changed

x-pack/solutions/security/plugins/cloud_security_posture/public/components/fleet_extensions/gcp_credentials_form/gcp_credential_form.tsx

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -577,28 +577,8 @@ export const GcpInputVarFields = ({
577577
};
578578

579579
const organizationIdFields = getFieldById('gcp.organization_id');
580-
const organizationIdValueInvalid = fieldIsInvalid(
581-
organizationIdFields?.value,
582-
hasInvalidRequiredVars
583-
);
584-
const organizationIdError = i18n.translate(
585-
'xpack.csp.cspmIntegration.integration.fieldRequired',
586-
{
587-
defaultMessage: '{field} is required',
588-
values: {
589-
field: organizationIdFields?.label,
590-
},
591-
}
592-
);
593580

594581
const projectIdFields = getFieldById('gcp.project_id');
595-
const projectIdValueInvalid = fieldIsInvalid(projectIdFields?.value, hasInvalidRequiredVars);
596-
const projectIdError = i18n.translate('xpack.csp.cspmIntegration.integration.fieldRequired', {
597-
defaultMessage: '{field} is required',
598-
values: {
599-
field: projectIdFields?.label,
600-
},
601-
});
602582

603583
const credentialsTypeFields = getFieldById('gcp.credentials.type');
604584

@@ -644,38 +624,26 @@ export const GcpInputVarFields = ({
644624
<div>
645625
<EuiForm component="form">
646626
{organizationIdFields && isOrganization && (
647-
<EuiFormRow
648-
fullWidth
649-
label={gcpField.fields['gcp.organization_id'].label}
650-
isInvalid={organizationIdValueInvalid}
651-
error={organizationIdValueInvalid ? organizationIdError : undefined}
652-
>
627+
<EuiFormRow fullWidth label={gcpField.fields['gcp.organization_id'].label}>
653628
<EuiFieldText
654629
disabled={disabled}
655630
data-test-subj={CIS_GCP_INPUT_FIELDS_TEST_SUBJECTS.ORGANIZATION_ID}
656631
id={organizationIdFields.id}
657632
fullWidth
658633
value={organizationIdFields.value || ''}
659634
onChange={(event) => onChange(organizationIdFields.id, event.target.value)}
660-
isInvalid={organizationIdValueInvalid}
661635
/>
662636
</EuiFormRow>
663637
)}
664638
{projectIdFields && (
665-
<EuiFormRow
666-
fullWidth
667-
label={gcpField.fields['gcp.project_id'].label}
668-
isInvalid={projectIdValueInvalid}
669-
error={projectIdValueInvalid ? projectIdError : undefined}
670-
>
639+
<EuiFormRow fullWidth label={gcpField.fields['gcp.project_id'].label}>
671640
<EuiFieldText
672641
disabled={disabled}
673642
data-test-subj={CIS_GCP_INPUT_FIELDS_TEST_SUBJECTS.PROJECT_ID}
674643
id={projectIdFields.id}
675644
fullWidth
676645
value={projectIdFields.value || ''}
677646
onChange={(event) => onChange(projectIdFields.id, event.target.value)}
678-
isInvalid={projectIdValueInvalid}
679647
/>
680648
</EuiFormRow>
681649
)}
@@ -743,8 +711,6 @@ export const GcpInputVarFields = ({
743711
onChange={(value) => {
744712
onChange(credentialJSONFields.id, value);
745713
}}
746-
errors={credentialJSONFieldsInvalid ? [credentialJSONError] : []}
747-
forceShowErrors={false}
748714
isEditPage={isEditPage}
749715
/>
750716
</Suspense>

0 commit comments

Comments
 (0)