Professional Cloud DevOps Engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.
Last updated
A DevOps team is standardizing their cloud development environments across Google Cloud Workstations and Visual Studio Code. The team needs to modernize a legacy microservice codebase by refactoring functions, debugging issues, and automating unit test creation using Gemini Code Assist.
The organization mandates strict enterprise security and IP compliance requirements:
Which configuration and workflow should the team implement to meet these requirements?
Define sensitive file paths in a .aiexclude file in the project repository, set "geminicodeassist.recitation.maxCitedLength": 0 in the settings.json configuration, and use the inline code transformation shortcut (Control+I or Command+I) to generate tests, refactor code, and inspect proposed changes via the diff view.
Set "cloudcode.beta.forceOobLogin": false in the settings.json configuration, add sensitive files to .dockerignore, and use the /explain smart command in the inline text box to automatically rewrite legacy code and generate unit tests.
Configure an organization-level IAM deny policy on cloudaicompanion.companions.generateCode, create a .geminiignore file in the workspace, and copy legacy code into the Gemini Chat pane with the prompt Refactor and test.
Define sensitive file paths in a .gcloudignore file, set "geminicodeassist.recitation.maxCitedLength": -1 in the settings.json configuration, and invoke the gcloud gemini code-transform CLI command from the integrated terminal to generate test diffs.
Define sensitive file paths in a .aiexclude file in the project repository, set "geminicodeassist.recitation.maxCitedLength": 0 in the settings.json configuration, and use the inline code transformation shortcut (Control+I or Command+I) to generate tests, refactor code, and inspect proposed changes via the diff view.
This solution configures Gemini Code Assist in the developer IDE using native security, IP compliance, and code transformation capabilities. It utilizes context exclusion files, citation recitation limits, and inline AI interactions with interactive visual diff inspection.
.aiexclude file (following standard .gitignore syntax) instructs the Gemini Code Assist extension to exclude sensitive directories, files, or patterns from local context inclusion during chat, inline completion, and smart actions."geminicodeassist.recitation.maxCitedLength": 0 in the IDE's settings.json blocks Gemini from suggesting code that directly quotes from known cited sources, preventing unintended open-source license violations.Control+I on Windows/Linux or Command+I on macOS) allows developers to enter natural language prompts (such as Write unit tests for my code or Refactor this function) and visually review proposed code changes in an integrated diff view before choosing to Accept or Discard.This approach directly leverages native Google Cloud IDE extension capabilities that enforce governance at the developer workstation level while maximizing development speed through built-in diffs and smart actions.
Set "cloudcode.beta.forceOobLogin": false in the settings.json configuration, add sensitive files to .dockerignore, and use the /explain smart command in the inline text box to automatically rewrite legacy code and generate unit tests.
Configure an organization-level IAM deny policy on cloudaicompanion.companions.generateCode, create a .geminiignore file in the workspace, and copy legacy code into the Gemini Chat pane with the prompt Refactor and test.
Define sensitive file paths in a .gcloudignore file, set "geminicodeassist.recitation.maxCitedLength": -1 in the settings.json configuration, and invoke the gcloud gemini code-transform CLI command from the integrated terminal to generate test diffs.