GCP projects
Give learners access to GCP projects.
Last updated
Was this helpful?
Give learners access to GCP projects.
Last updated
Was this helpful?
Cloud account usage can lead to abuse without the appropriate security policies in place. Always be sure to implement the appropriate policies and restrictions before exposing tracks with cloud accounts to the public.
Costs associated with cloud accounts are in addition to your standard Instruqt billing. Therefore, you should take extra precautions when allowing users to access tracks that have cloud accounts.
This guide explains how to access a Google Cloud Platform (GCP) project from Instruqt.
A GCP project is a set of configuration settings that define how your app interacts with Google services and what resources it uses.
—
You must have already created a track or sandbox preset to which you can add access to a GCP project.
It is best to add the Instruqt container to your sandbox to give a learner access to a GCP project. Because the Instruqt Cloud Client container:
Exposes links to GCP Cloud Consoles for the resources configured in the config.yml
file, with the credentials required to log in.
Includes the gcloud
CLI, pre-configured with the required credentials.
The GCP Cloud Console and the gcloud
CLI make it easy for content developers and learners to access Google Cloud resources from the sandbox.
It takes the following steps to give learners access to a GCP project:
Add an Instruqt container to your sandbox
Add a GCP project to your sandbox.
Add tabs to your challenges where you want to expose the GCP console or gcloud
CLI.
Additionally, you can use:
A set of environment variables that are available in the gcloud
CLI.
Google Cloud APIs that you set through IAM permissions.
Click + Add a cloud account on the Sandbox page. ↳ The Add cloud account pop-up opens.
Select the Google provider.
In the Name field, enter example-project
.
In the Services field, select the services that are going to be enabled.
In the Regions field, select the regions that are going to be enabled.
In the User Roles field, enter the desired roles for the end user.
In the Admin Roles field, enter the desired roles for the admin user.
Click Save to add the GCP project.
Click Back to track to return to the Track dashboard page.
gcloud
CLIIn the Challenges section, click Add new, and select Assignment from the dropdown.
On the new challenge page, input these values:
Name
GCP project
URL
gcp-project
Description
Learn to work with a GCP project
Click Save.
Click Tabs followed by Add new tab.
Select the Your applications tab type.
Input these values to set the GCP console:
Tab name
CGP project console
Select your host
cloud-client
Path
/
Port
80
Click Save to add the tab.
Click Add new tab again.
Select the Terminal tab type.
Input these values to set the gcloud
CLI:
Tab name
gcloud CLI
Host
cloud-client
Click Save to add the tab.
Click Back to track.
Click Play track and test your GCP project track.
Nice job! Your learners can now access GCP projects. But there is more. You can also give them access to:
More information can be found in the section.
Make sure to configure the permissions for the GCP project to control unauthorized behavior within the environment. You can find more information on how to do this in .
You have control over which services and regions learners can access. We highly recommend you only provide access to what is strictly needed to complete the track. See for more detail.
Only enabled services and regions configured by the team administrator at a global level can be selected and/or specified. See more details in