Featured resource
Tech Upskilling Playbook 2025
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Learn more
  • Labs icon Lab
  • Cloud
  • Security
Labs

Creating and Managing GCP Service Accounts

Unlike standard IAM member accounts, service accounts are used by applications, services, or VM instances and not people. Nonetheless, the two types of accounts share many of the same features, including the ability to be assigned pre-defined or custom roles. But, of course, there are differences such as the technique for associating a VM instance with a service account. In this hands-on lab, you'll work with service accounts in a variety of ways: creating, editing, disabling, enabling, assigning IAM roles, and attaching a service account to a VM instance.

Labs

Path Info

Level
Clock icon Beginner
Duration
Clock icon 45m
Last updated
Clock icon Aug 28, 2025

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Create a service account.

    1. From the Google Cloud console's main navigation, choose IAM & admin > Service accounts.
    2. Click Create Service Account.
    3. On the Create Service Account page, enter a name such as App Team Service Account.
    4. Click Create.
    5. On the next page, leave the Service account permissions as their default settings and click Continue.
    6. On the next page, leave the Users access fields blank.
    7. Click Create Key.
    8. On the Create Key panel, set the Key Type to JSON and click Create.
    9. Save the generated key to the desired location on your local system and, in the dialog, click Close.
    10. Click Done.
  2. Challenge

    Edit the service account.

    1. From the Service Accounts page, review the created account entry.
    2. Select the associated Actions icon and choose Edit.
    3. In the Description field, enter the following: For development only.
    4. Click Save.
  3. Challenge

    Disable and enable service account.

    1. From the Service Accounts page, review the revised account entry.
    2. Select the associated Actions icon and choose Disable.
    3. In the dialog that appears, click Disable.
    4. Note the revised Status icon.
    5. Select the associated Actions icon and choose Enable.
    6. In the dialog that appears, click Enable.
    7. Note the revised Status icon.
  4. Challenge

    Assign IAM roles to service account.

    1. From the Service Accounts page, copy the email address for the new service account.
    2. From the IAM navigation, choose IAM.
    3. Click Add Member.
    4. In the Add Members panel, paste the copied email address into the New Members field.
    5. In the Select a role field, choose Viewer.
    6. Click Save.
  5. Challenge

    Attach the service account to a VM instance.

    1. From the main Google Cloud navigation, choose Compute Engine > VM Instances.
    2. Choose Create Instance.
    3. Leave all the values at their defaults.
    4. In the Identity and API Access section, select the Service account list and choose the App Team Service Account entry.
    5. Click Create.
  6. Challenge

    Delete the service account.

    1. From the Google Cloud console's main navigation, choose IAM & admin > Service accounts.
    2. Select the associated Actions icon and choose Delete.
    3. In the dialog that appears, click Delete.

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.