Update mutation for google cloud logging configuration
What does this MR do and why?
Describe in detail what your merge request does and why.
Update mutation for google cloud logging configuration
This commits add update mutation for google cloud logging configuration, which will be used to stream audit events to google cloud logging service
EE: true Changelog: added
How to set up and validate locally
- Run below GraphQL mutation to create google cloud logging config
mutation createGoogleCloudLoggingConfiguration {
googleCloudLoggingConfigurationCreate(
input: {
groupPath: "GROUP_PATH",
googleProjectIdName: "testing-id",
logIdName: "somelogId",
clientEmail: "test@example.com",
privateKey: "someencryptedkey"}
) {
googleCloudLoggingConfiguration {
id
googleProjectIdName
logIdName
privateKey
clientEmail
},
errors,
}
}
- Now update a field using the below mutation
mutation updateGoogleCloudLoggingConfiguration {
googleCloudLoggingConfigurationUpdate(input: {
id: "gid://gitlab/AuditEvents::GoogleCloudLoggingConfiguration/ID",
googleProjectIdName: "testing-id-36",
}){
errors,
googleCloudLoggingConfiguration {
id,
logIdName,
privateKey,
googleProjectIdName,
},
}
}
-
Check the fields are correctly updated.
-
This MR also adds google cloud logging configuration type into group type so we can query group to check present gc configs
query seeGoogleCloudLoggingConfigurations{
group(fullPath:"GROUP_PATH"){
id
googleCloudLoggingConfigurations{
nodes{
id
logIdName
googleProjectIdName
privateKey
}
}
}
}
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #409422 (closed)
Edited by Harsimar Sandhu